
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

import App from './App.vue'
import router from './router'

import '@/styles/common.scss'

// 引入懒加载插件
import {lazyPlugin} from '@/directives/index'
// 引入全局组件
import {componentPlugin} from '@/components/index'

const app = createApp(App)
const pinia = createPinia()
// 注册持久化插件，防止刷新token丢失
pinia.use(piniaPluginPersistedstate)

app.use(lazyPlugin)
app.use(componentPlugin)
app.use(pinia)
app.use(router)

app.mount('#app')










